﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master"
    Inherits="System.Web.Mvc.ViewPage" %>

<%@ Import Namespace="System.Collections.ObjectModel" %>
<%@ Import Namespace="DoubanApi.Models" %>
<%@ Import Namespace="ZYStudios.Helper" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    中影·国际影城 欢迎你
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="../Scripts/slides.min.jquery.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.ellipsis.js" type="text/javascript"></script>

    <link href="../Content/Index.css" rel="stylesheet" type="text/css" />
    <link href="../Content/IndexPlaytime.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(document).ready(function () {
            $(function () {
                $('#slides').slides({
                    preload: true,
                    play: 5000,
                    pause: 2500,
                    hoverPause: true
                });
            });
            $('.text_overflow').wordLimit(20);
        })
    </script>


    <style type="text/css">
        .text_overflow
        {
	        width: 195px;
        }
    </style>

    <!--[if gte IE 7]>
        <style type="text/css">
        .text_overflow
        {
	        width: 170px;
        }
        .IndexActivity li
        {
	        height:158px;
        }
        </style>
    <![endif]-->


    <!--[if lte IE 6]>
	    <script type="text/javascript" src="../Scripts/supersleight-min.js"></script>
        <style type="text/css">
        .text_overflow
        {
	        width: 170px;
        }
        .IndexActivity li
        {
	        height:158px;
        }
        </style>
    <![endif]-->
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <div id="slides">
            <div class="slides_container">
            <% List<ZYStudios.Models.IndexImageEditModel> IndexImageList = ViewData["IndexImages"] as List<ZYStudios.Models.IndexImageEditModel>; %>
            <%foreach (var imageItem in IndexImageList)
              { %>
              <%if (string.IsNullOrEmpty(imageItem.ImageLink))
                { %>
                <a><img src='<%=imageItem.ImageUrl %>' alt="" /></a>
              <%}
                else
                { %>
                <a href='<%=imageItem.ImageLink %>'><img style="border:0" src='<%=imageItem.ImageUrl %>' alt="" /></a>
              <%} %>
              
            <%} %>
            </div>
        </div>
        <br />
 
        <table id="table1">
            <tr>
                <td>
                    <div style="text-align:center"><%=Html.ActionLink("今日排片", "Playtime", "Movie", null, new { @class = "MenuTitle2" })%></div>
                    <br />
                    <div>
                        <% var PlayTimes = ViewData["PlayTimes"] as List<ZYStudios.Models.PlaytimeItemModel>; %>
                         <span class="IndexPlaytime">
                           <% foreach (var movie in PlayTimes)
                              { %>
                              <li>
                              <a href="<%=Url.Action("Movie","Movie",new {id=movie.Movie.Id}) %>"><%="<img style='border:0' src='"+movie.Movie.ImageLink+"' alt='' />" %></a>
                              <span class="MovieTitle"><a class="text_overflow" href="<%=Url.Action("Movie","Movie",new {id=movie.Movie.Id}) %>"><%=movie.MovieName%></a></span>
                              <br />
                              <br />
                              <br />
                              <div class="time">
                              <%=movie.PlayTime%>
                              </div>
                              </li>
                            <%} %>
                        </span>
                    </div>
                    <div style="text-align:right"><%=Html.ActionLink("显示更多...", "Playtime", "Movie", null, new { @class = "BtMore" })%></div>
                </td>
                <%--<td style="width: 10px !important;" />--%>
                <td class="tableSplit" />
                <td style="width: 10px !important;" />
                <td>
                    <div>
                        <div style="text-align:center"><%=Html.ActionLink("缤纷活动", "Index", "Activity", null, new { @class = "MenuTitle2" })%></div>
                        <br />
                        <div  style="overflow:hidden; max-height:504px">

                         <% var Activitys = ViewData["Activitys"] as List<ZYStudios.Models.ActivityEditModel>; %>
                         <span class="IndexActivity">
                           <% foreach (var activity in Activitys)
                              { %>
                              <li>
                              <span><%=activity.ActivityName %></span><br />
                              <span><%=activity.ActivityContent %></span>
                              </li>
                            <%} %>

                        </div>
                        <div style="text-align:right"><%=Html.ActionLink("显示更多...", "Index", "Activity", null, new { @class = "BtMore" })%></div>
                    </div>
                </td>
            </tr>
        </table>
    </div>

</asp:Content>
